@import 'variables.scss';
@import 'element-variables';

$--font-path: '~element-ui/lib/theme-chalk/fonts';
@import '~element-ui/packages/theme-chalk/src/index';

html *,
body * {
  box-sizing: border-box;
}

@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: normal;
  src: local('Roboto Light'), local('Roboto-Light'), url(../fonts/Roboto-Light.woff) format('woff'),
    url(../fonts/Roboto-Light.ttf) format('truetype');
}

body {
  background-color: #f0f2f5;
  padding: 0;
  margin: 0;
  color: rgba(0, 0, 0, 0.65);
  font-size: 14px;
  font-family: -apple-system, BlinkMacSystemFont, Segoe UI, PingFang SC, Hiragino Sans GB, Microsoft YaHei,
    Helvetica Neue, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol;
}

#app {
  min-width: 1200px;
  margin: 0 auto;
}

#nprogress {
  .bar {
    background: #34c388;
  }

  .peg {
    box-shadow: 0 0 10px #34c388, 0 0 5px #34c388;
  }
}

.app-wrapper {
  padding: 24px !important;
}

.line {
  height: 1px;
  min-width: 50px;
  background-color: #34c388;
  margin: 0 auto;
}

.trans-up {
  @extend %trans-up-styles;
}

.ant-card-bordered {
  border: none;
}

.emq-list-card.ant-card {
  .ant-card-head {
    border-bottom: 1px solid #eee;

    .ant-card-head-title {
      color: #303133;
      text-align: center;
      font-weight: normal;
      position: relative;

      .back-btn {
        position: absolute;
        left: 0;
        cursor: pointer;
        font-size: 14px;

        &:before {
          font-family: 'element-icons', serif !important;
          content: '\e6de';
          font-weight: bold;
        }
      }
    }
  }

  &:last-child {
    margin-bottom: 50px;
  }
}

.emq-table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0px 0 24px 0;
  .search-wrapper {
    width: 400px;
    display: flex;
    align-items: center;
    justify-content: space-between;

    .node-select {
      width: 100%;
    }

    .el-button {
      margin-left: 12px;
    }
  }
}

.emq-table-footer {
  margin-top: 24px;
  text-align: center;
}

.btn {
  cursor: pointer;
  user-select: none;

  &:not(.btn-default) {
    color: #34c388;
  }

  &.raw {
    &:hover {
      color: #34c388;
    }
  }
}

.emq-title {
  font-size: 16px;
  color: #333333;
  font-weight: bolder;
  margin-bottom: 40px;

  &.h3 {
    font-size: 14px;
  }

  &[size='small'] {
    font-size: 14px;
  }

  .sub-title {
    font-weight: normal;
    display: block;
    font-size: 12px;
    color: #8f9297;
    margin-top: 12px;
  }

  &.required-title {
    &:before {
      content: '*';
      color: #f5222d;
      margin-right: 4px;
    }
  }
}

.emq-option-item {
  display: flex;
  justify-content: space-between;

  .option-value {
    font-size: 13px;
    padding-left: 10px;
  }
}

.state {
  position: relative;
  top: -1px;
  display: inline-block;
  width: 6px;
  height: 6px;
  vertical-align: middle;
  border-radius: 50%;
}

.emq-popover-content {
  font-size: 12px;
}

.field-info {
  margin: 0;
  list-style: none;
  padding: 3px 0;
  line-height: 35px;

  .field-title {
    display: inline-block;
    font-style: normal;
    font-size: 14px;
    color: #999;
    padding-right: 16px;
  }

  .field-value {
    font-size: 14px;
    color: #101010;
  }
}

.ant-badge-status-success {
  background-color: #34c388;
}

.ant-badge {
  &[type='success'] {
    .ant-badge-status-text {
      color: #34c388;
    }
  }

  &[type='error'] {
    .ant-badge-status-text {
      color: #f5222d;
    }
  }
}

// Text-aligin button group
.button-group {
  margin-top: 24px;
  &__center {
    text-align: center;
  }
  &__right {
    text-align: right;
  }
}

// Monaco editor
.monaco-container {
  border: 1px solid #d9d9d9;
}
/* 修复 Safari 浏览器的光标问题 */
input {
  line-height: normal !important;
}
